<div class="row m-n">
    <div tabset type="tab">
        <div tab heading="收货地址列表" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="addData()" ng-disabled="!btnPermission.deliveryAdd"
                        translate translate-attr-title="{{!btnPermission.deliveryAdd?'无权限执行此操作':''}}">新增</button>
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')" translate-attr-title="高级搜索" translate="高级搜索more"></button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" translate translate-attr-placeholder="收货人"
                               ng-model="condition.receiverName">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)" translate>搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>收货地址</span>：</label>
                        <input type="text" name="dealerCode" ng-model="condition.receiverAddress" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>联系方式</span>：</label>
                        <input type="text" name="dealerCode" ng-model="condition.receiverTel" class="form-control">
                    </div>
                </div>
            </div>

            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tbConf.fixedWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tbConf.tableCol, $index)" ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tbConf.fixedWidth" fixed-width="tbStyle.scrollLeft"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tbConf.tableCol, $index)" ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tbConf.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y">
                        <table class="table-fixed border-none" width="{{tbConf.fixedWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.cueRow}"
                                ng-click="selectRow($index)">
                                <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !!itemCol.isFixed" title="{{item[itemCol.dataField]}}">
                                    <div class="font-0" ng-if="itemCol.type === 'operate'">
                                        <button class="btn btn-operate m-r-xs" ng-click="editData(item)"
                                                ng-disabled="!btnPermission.deliveryEdit" 
                                                translate translate-attr-title="{{!btnPermission.deliveryEdit?'无权限执行此操作':''}}">编辑</button>
                                        <button class="btn btn-operate m-r-xs" ng-click="delData('single', item.id)"
                                                ng-disabled="!btnPermission.deliveryDel" 
                                                translate translate-attr-title="{{!btnPermission.deliveryDel?'无权限执行此操作':''}}">删除</button>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index" ng-class="{'row-selected': $index === markInfo.cueRow}" ng-click="selectRow($index)">
                                <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="{{tabFlag.name}}" active="activeFlag[1]" ng-if="activeFlag[1]">
            <form name="form" class="form-horizontal wrapper-md clearfix" novalidate>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i><span translate>收货人</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="receiverName" class="form-control" ng-model="detailInfo.receiverName"
                               required yb-focus maxlength="20">
                    </div>
                    <div class="col-xs-4 msg-block"
                         ng-show="form.receiverName.$dirty || (form.receiverName.$invalid && submitted)">
                        <div class="error-msg" ng-if="form.receiverName.$error.required && !form.receiverName.focused">
                            <i class="yb-icon ico-times-circular"></i><span translate>必填项，请填写</span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>收货地址</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="receiverAddress" class="form-control" ng-model="detailInfo.receiverAddress" maxlength="200">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label"><span translate>联系方式</span>：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" name="receiverTel" class="form-control" ng-model="detailInfo.receiverTel" maxlength="20"
                               yb-contact yb-focus>
                    </div>
                    <div class="col-xs-4 msg-block"
                         ng-show="form.receiverTel.$dirty || (form.receiverTel.$invalid&&submitted)">
                        <div class="error-msg" ng-show="form.receiverTel.$error.contactInfo && !form.receiverTel.focused">
                            <i class="yb-icon ico-times-circular"></i><span translate>请输入正确的手机号码或电话号码</span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-xs-offset-2">
                        <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData(form.$valid)" translate>保存</button>
                        <button type="button" class="btn btn-default" ng-click="changeTab(0)" translate>取消</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>